package com.tianji.learning.controller;


import com.tianji.learning.domain.po.SignRecord;
import com.tianji.learning.domain.vo.SignResultVO;
import com.tianji.learning.service.ISignRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 签到记录表 前端控制器
 * </p>
 *
 * @author Aimer
 * @since 2025-11-16
 */
@RestController
@RequestMapping("/sign-records")
@Api(tags = "签到接口")
@RequiredArgsConstructor
public class SignRecordController {
    private final ISignRecordService iSignRecordService;

    @PostMapping
    @ApiOperation("签到功能接口")
    public SignResultVO addSignRecords(){
       return iSignRecordService.addSignRecords();
    }

    @GetMapping
    @ApiOperation("查询当前用户的签到情况")
    public List<Byte> getUserSignCondition(){
        return iSignRecordService.getUserSignCondition();
    }
}
